# 你可以在这里定义所需的宏
set(APP_NAME "TJUApp")
set(APP_VERSION "1.0.0")
set(DEBUG_MODE 1)

# 生成 config.h 头文件
file(WRITE ${OUTPUT_FILE} "#ifndef CONFIG_H\n")
file(APPEND ${OUTPUT_FILE} "#define CONFIG_H\n")
file(APPEND ${OUTPUT_FILE} "\n")

# 添加宏定义
file(APPEND ${OUTPUT_FILE} "#define APP_NAME \"${APP_NAME}\"\n")
file(APPEND ${OUTPUT_FILE} "#define APP_VERSION \"${APP_VERSION}\"\n")

if (DEBUG_MODE)
    file(APPEND ${OUTPUT_FILE} "#define DEBUG_MODE 1\n")
else ()
    file(APPEND ${OUTPUT_FILE} "#define DEBUG_MODE 0\n")
endif ()

# 结束文件
file(APPEND ${OUTPUT_FILE} "\n#endif\n")
